<!doctype html>
<html ng-app="myApp">
<head>
  <script src="js/angular.js"></script>
</head>
<body>


  <div ng-init="myProperty = 'wow, this is cool'"></div>
  Surrounding scope: {{ myProperty }}
  <div my-inherit-scope-directive="SomeController">
    Inside an directive with inherited scope: {{ myProperty }}
  </div>
  <div my-directive>
    Inside myDirective, isolate scope: {{ myProperty }}
  <div>

  <script>
    angular.module('myApp', [])
    .directive('myDirective', function() {
      return {
        restrict: 'A',
        scope: {}
      };
    })
    .directive('myInheritScopeDirective', function() {
      return {
        restrict: 'A',
        scope: true
      };
    })
  </script>

</body>
</html>